package com.eatme.web.app.coupon.distribution.feign;

import com.eatme.web.app.coupon.common.exception.AppException;
import com.eatme.web.app.coupon.common.vo.SettlementInfo;
import com.eatme.web.common.vo.AppResponse;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

/**
 * 优惠券结算微服务 Feign 接口定义
 */
@FeignClient(value = "web-case",contextId = "SettlementClient")
public interface SettlementClient {

    /**
     * <h2>优惠券规则计算</h2>
     * */
    @RequestMapping(value = "/settlement/compute",
            method = RequestMethod.POST)
    AppResponse<SettlementInfo> computeRule(
            @RequestBody SettlementInfo settlement) throws AppException;
}
